public class test527 {
    public static void main(String[] args) {
        int count = 0; // 闰年计数器
        System.out.println("101到2100之间的闰年：");
        for (int year = 101; year <= 2100; year++) {
            boolean isLeap = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
            if (isLeap) {
                System.out.print(year + " ");
                count++;
                if (count % 10 == 0) {
                    System.out.println();
                }
            }
        }
        System.out.printf("%n%n101到2100之间共有%d个闰年", count);
    }
}

